.class public Lorg/zeam/LauncherAppWidgetHostView;
.super Landroid/appwidget/AppWidgetHostView;
.source "LauncherAppWidgetHostView.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lorg/zeam/LauncherAppWidgetHostView$CheckForLongPress;
    }
.end annotation


# static fields
.field private static final WIDGET_LONG_CLICK_TIMEOUT:J = 0x2bcL


# instance fields
.field private mHasPerformedLongPress:Z

.field private mInflater:Landroid/view/LayoutInflater;

.field private mPendingCheckForLongPress:Lorg/zeam/LauncherAppWidgetHostView$CheckForLongPress;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .parameter "context"

    .prologue
    .line 18
    invoke-direct {p0, p1}, Landroid/appwidget/AppWidgetHostView;-><init>(Landroid/content/Context;)V

    .line 19
    const-string v0, "layout_inflater"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/LayoutInflater;

    iput-object v0, p0, Lorg/zeam/LauncherAppWidgetHostView;->mInflater:Landroid/view/LayoutInflater;

    .line 20
    return-void
.end method

.method static synthetic access$0(Lorg/zeam/LauncherAppWidgetHostView;)I
    .locals 1
    .parameter

    .prologue
    .line 1
    invoke-virtual {p0}, Lorg/zeam/LauncherAppWidgetHostView;->getWindowAttachCount()I

    move-result v0

    return v0
.end method

.method static synthetic access$1(Lorg/zeam/LauncherAppWidgetHostView;)Z
    .locals 1
    .parameter

    .prologue
    .line 14
    iget-boolean v0, p0, Lorg/zeam/LauncherAppWidgetHostView;->mHasPerformedLongPress:Z

    return v0
.end method

.method static synthetic access$2(Lorg/zeam/LauncherAppWidgetHostView;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 14
    iput-boolean p1, p0, Lorg/zeam/LauncherAppWidgetHostView;->mHasPerformedLongPress:Z

    return-void
.end method

.method private postCheckForLongClick()V
    .locals 3

    .prologue
    .line 71
    const/4 v0, 0x0

    iput-boolean v0, p0, Lorg/zeam/LauncherAppWidgetHostView;->mHasPerformedLongPress:Z

    .line 72
    iget-object v0, p0, Lorg/zeam/LauncherAppWidgetHostView;->mPendingCheckForLongPress:Lorg/zeam/LauncherAppWidgetHostView$CheckForLongPress;

    if-nez v0, :cond_0

    .line 73
    new-instance v0, Lorg/zeam/LauncherAppWidgetHostView$CheckForLongPress;

    invoke-direct {v0, p0}, Lorg/zeam/LauncherAppWidgetHostView$CheckForLongPress;-><init>(Lorg/zeam/LauncherAppWidgetHostView;)V

    iput-object v0, p0, Lorg/zeam/LauncherAppWidgetHostView;->mPendingCheckForLongPress:Lorg/zeam/LauncherAppWidgetHostView$CheckForLongPress;

    .line 75
    :cond_0
    iget-object v0, p0, Lorg/zeam/LauncherAppWidgetHostView;->mPendingCheckForLongPress:Lorg/zeam/LauncherAppWidgetHostView$CheckForLongPress;

    invoke-virtual {v0}, Lorg/zeam/LauncherAppWidgetHostView$CheckForLongPress;->rememberWindowAttachCount()V

    .line 76
    iget-object v0, p0, Lorg/zeam/LauncherAppWidgetHostView;->mPendingCheckForLongPress:Lorg/zeam/LauncherAppWidgetHostView$CheckForLongPress;

    const-wide/16 v1, 0x2bc

    invoke-virtual {p0, v0, v1, v2}, Lorg/zeam/LauncherAppWidgetHostView;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 77
    return-void
.end method


# virtual methods
.method public cancelLongPress()V
    .locals 1

    .prologue
    .line 82
    invoke-super {p0}, Landroid/appwidget/AppWidgetHostView;->cancelLongPress()V

    .line 83
    const/4 v0, 0x0

    iput-boolean v0, p0, Lorg/zeam/LauncherAppWidgetHostView;->mHasPerformedLongPress:Z

    .line 84
    iget-object v0, p0, Lorg/zeam/LauncherAppWidgetHostView;->mPendingCheckForLongPress:Lorg/zeam/LauncherAppWidgetHostView$CheckForLongPress;

    if-eqz v0, :cond_0

    .line 85
    iget-object v0, p0, Lorg/zeam/LauncherAppWidgetHostView;->mPendingCheckForLongPress:Lorg/zeam/LauncherAppWidgetHostView$CheckForLongPress;

    invoke-virtual {p0, v0}, Lorg/zeam/LauncherAppWidgetHostView;->removeCallbacks(Ljava/lang/Runnable;)Z

    .line 87
    :cond_0
    return-void
.end method

.method protected getErrorView()Landroid/view/View;
    .locals 3

    .prologue
    .line 24
    iget-object v0, p0, Lorg/zeam/LauncherAppWidgetHostView;->mInflater:Landroid/view/LayoutInflater;

    const v1, 0x7f030007

    const/4 v2, 0x0

    invoke-virtual {v0, v1, p0, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v0

    return-object v0
.end method

.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 2
    .parameter "motionEvent"

    .prologue
    const/4 v1, 0x0

    .line 29
    iget-boolean v0, p0, Lorg/zeam/LauncherAppWidgetHostView;->mHasPerformedLongPress:Z

    if-eqz v0, :cond_0

    .line 30
    iput-boolean v1, p0, Lorg/zeam/LauncherAppWidgetHostView;->mHasPerformedLongPress:Z

    .line 31
    const/4 v0, 0x1

    .line 46
    :goto_0
    return v0

    .line 33
    :cond_0
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :cond_1
    :goto_1
    :pswitch_0
    move v0, v1

    .line 46
    goto :goto_0

    .line 35
    :pswitch_1
    invoke-direct {p0}, Lorg/zeam/LauncherAppWidgetHostView;->postCheckForLongClick()V

    goto :goto_1

    .line 40
    :pswitch_2
    iput-boolean v1, p0, Lorg/zeam/LauncherAppWidgetHostView;->mHasPerformedLongPress:Z

    .line 41
    iget-object v0, p0, Lorg/zeam/LauncherAppWidgetHostView;->mPendingCheckForLongPress:Lorg/zeam/LauncherAppWidgetHostView$CheckForLongPress;

    if-eqz v0, :cond_1

    .line 42
    iget-object v0, p0, Lorg/zeam/LauncherAppWidgetHostView;->mPendingCheckForLongPress:Lorg/zeam/LauncherAppWidgetHostView$CheckForLongPress;

    invoke-virtual {p0, v0}, Lorg/zeam/LauncherAppWidgetHostView;->removeCallbacks(Ljava/lang/Runnable;)Z

    goto :goto_1

    .line 33
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_2
        :pswitch_0
        :pswitch_2
    .end packed-switch
.end method
